import request from '@/utils/request'

export function departmentAPI() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}
// 获取部门负责人列表
export function getdepartmentAPI() {
  return request({
    url: '/sys/user/simple',
    method: 'GET'
  })
}
// 新增
export function addpartmentAPI(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 删除
export function delpartmentAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'

  })
}
// 获取详情
export function getpartmentAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'
  })
}
// 更新详情
export function updatepartmentAPI(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}

